package szxy.base.day05;

public class demo10Array {
    public static void main(String[] args) {
        int[] arr1 = {1,2,3,4,5,6};
        System.out.println(arr1[0]);
        System.out.println(arr1[1]);
        System.out.println(arr1[2]);
        System.out.println(arr1[3]);
        System.out.println(arr1[4]);
        System.out.println(arr1[5]);
//        System.out.println(arr1[6]); // ArrayIndexOutOfBoundsException 数组索引越界异常 原因是因为取了没有的索引

        // null代表的意思是空，什么都没有
        arr1 = null;
//        System.out.println(arr1[0]); // NullPointerException

    }
}
